package org.sbbs.security.webapp.action;

import javax.servlet.http.HttpServletRequest;

import org.sbbs.base.webapp.action.BaseGridAction;
import org.sbbs.base.webapp.search.PropertySearchBuilder;
import org.sbbs.security.service.UrlResourceManager;

import com.googlecode.genericdao.search.Search;
import com.googlecode.genericdao.search.SearchResult;

public class UrlResourcePagedAction extends BaseGridAction {

	private static final long serialVersionUID = -4720115820370561960L;

	private UrlResourceManager urlResourceManager;


	public void setUrlResourceManager(UrlResourceManager urlResourceManager) {
		this.urlResourceManager = urlResourceManager;
	}


	public String gridPageList() {
		HttpServletRequest req = this.getRequest();
		Search search = PropertySearchBuilder.BuildSearch(getRequest());
		SearchResult srt = this.urlResourceManager.searchAndCount(search);

		this.preGridPageResult(search, srt);
		return this.ajaxReturn.success("load success,dwz message test.");
	}

}
